# 用户相关序列化器
from rest_framework import serializers
from .models import KnowledgeBaseFile
from .models import KnowledgeBase

class KnowledgeBaseFileSerializer(serializers.ModelSerializer):
    class Meta:
        model = KnowledgeBaseFile
        fields = ['id', 'file_name', 'tags', 'source', 'permissions', 'is_enabled', 'knowledge_base_id']

class KnowledgeBaseSerializer(serializers.ModelSerializer):
    class Meta:
        model = KnowledgeBase
        fields = ['id', 'name', 'version', 'created_at']
